/*****************************************************************************
*                                  RTPDEF.H
*
*  This is the include file for the RTP OAM EMC.
*
*****************************************************************************/
#ifndef RTPDEF_H
#define RTPDEF_H

#ifndef CTADEF_INCLUDED
#include <ctadef.h>
#endif

#ifdef __cplusplus
    extern "C"
    {
#endif

#define  RTP_SVCID   0x4006

/*-----------------------------------------------------------------------------
  RTP Event Codes.
    - These codes are constructed using the RTP_SVCID, the CT Access
      CTA_CODE_EVENT id, and a 1-based sequence number. The formula is
        EVENTCODE = ((RTP_SVCID<<16) | (CTA_CODE_EVENT | SEQUENCE))
    - If an event declaration is a "done" event 0x100 must also be ORed into
      event code.
        EVENTCODE = ((RTP_SVCID<<16) | (CTA_CODE_EVENT | 0x100 | SEQUENCE)
    - The actual event codes are "hardcoded" for source browsing purposes.
    - Note that the OAM Service also generates CT Access events as well; 
      therefore this is not an exhaustive list of all, OAM generated, 
      event codes.
  ---------------------------------------------------------------------------*/

#define RTPEVN_FLOW_START           0x40062001
#define RTPEVN_FLOW_STOP            0x40062002
#define RTPEVN_BEHIND_SCHED         0x40062003
#define RTPEVN_THREAD_ENTER         0x40062004
#define RTPEVN_THREAD_EXIT          0x40062005
#define RTPEVN_REGISTERING_BOARD    0x40062006
#define RTPEVN_REGISTERED_BOARD     0x40062007
#define RTPEVN_REFRESHED            0x40062008

/*-----------------------------------------------------------------------------
  RTP Reason Codes. 
    - RTP reason codes for events defined above.  These values are to be 
      utilized in the "value" member of the event structure, so that an 
      application can determine why an event occurred.
    - These codes are constructed using the RTP_SVCID, the CT Access
      CTA_CODE_REASON id, and a 1-based sequence number. The formula is
        REASONCODE = ((RTP_SVCID<<16) | (CTA_CODE_REASON | SEQUENCE))
    - The actual reason codes are "hardcoded" for source browsing purposes.
  ---------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------
  RTP Error codes. 
    - These codes are constructed using the RTP_SVCID, the CT Access
      CTA_CODE_ERROR id, and a 1-based sequence number. The formula is
         ERRORCODE = ((RTP_SVCID<<16) | (CTA_CODE_ERROR | SEQUENCE))  
    - The actual error codes are "hardcoded" for source browsing purposes.
  ---------------------------------------------------------------------------*/

#define RTPERR_FAILURE              0x40060001
#define RTPERR_INVALID_MODE         0x40060002
#define RTPERR_DRIVER_OPEN          0x40060003
#define RTPERR_DRIVER_RECV_MSG      0x40060004
#define RTPERR_DRIVER_RECV_BUF      0x40060005
#define RTPERR_DRIVER_SEND          0x40060006
#define RTPERR_TSI_TROUBLE          0x40060007
#define RTPERR_OS_TIMER_CONFIG      0x40060008
#define RTPERR_OS_TIMER_START       0x40060009
#define RTPERR_OS_TIMER_STOP        0x4006000A
#define RTPERR_WAIT_ON_MUX          0x4006000B
#define RTPERR_NO_IDENTITY_THREAD   0x4006000C
#define RTPERR_NO_BOARD_THREAD      0x4006000D
#define RTPERR_RANGE                0x4006000E

#ifdef __cplusplus
    }
#endif

#endif

